load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("build_infra")

rust_library(
    name = "buck2_client_ctx",
    srcs = glob(["src/**/*.rs"]),
    os_deps = [
        (
            "linux",
            [
                "fbsource//third-party/rust:nix",
                "fbsource//third-party/rust:termios",
            ],
        ),
        (
            "macos",
            [
                "fbsource//third-party/rust:nix",
                "fbsource//third-party/rust:termios",
            ],
        ),
        (
            "windows",
            [
                "fbsource//third-party/rust:winapi",
            ],
        ),
    ],
    test_deps = [
        "fbsource//third-party/rust:assert_matches",
        "fbsource//third-party/rust:indoc",
        "fbsource//third-party/rust:lsp-server",
        "fbsource//third-party/rust:pretty_assertions",
        "fbsource//third-party/rust:tempfile",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-compression",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:blake3",
        "fbsource//third-party/rust:bytes",
        "fbsource//third-party/rust:chrono",
        "fbsource//third-party/rust:clap",
        "fbsource//third-party/rust:console",
        "fbsource//third-party/rust:crossterm",
        "fbsource//third-party/rust:csv",
        "fbsource//third-party/rust:derivative",
        "fbsource//third-party/rust:derive_more",
        "fbsource//third-party/rust:fs4",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:hex",
        "fbsource//third-party/rust:httparse",
        "fbsource//third-party/rust:humantime",
        "fbsource//third-party/rust:itertools",
        "fbsource//third-party/rust:libc",
        "fbsource//third-party/rust:memmap2",
        "fbsource//third-party/rust:object",
        "fbsource//third-party/rust:once_cell",
        "fbsource//third-party/rust:pin-project",
        "fbsource//third-party/rust:prost-0-13-4",
        "fbsource//third-party/rust:prost-types-0-13-4",
        "fbsource//third-party/rust:rand",
        "fbsource//third-party/rust:regex",
        "fbsource//third-party/rust:serde",
        "fbsource//third-party/rust:serde_json",
        "fbsource//third-party/rust:shlex",
        "fbsource//third-party/rust:strum",
        "fbsource//third-party/rust:sysinfo",
        "fbsource//third-party/rust:take_mut",
        "fbsource//third-party/rust:termwiz",
        "fbsource//third-party/rust:tokio",
        "fbsource//third-party/rust:tokio-stream",
        "fbsource//third-party/rust:tokio-util",
        "fbsource//third-party/rust:tonic-0-12-3",
        "fbsource//third-party/rust:tracing",
        "//buck2/app/buck2_build_info:buck2_build_info",
        "//buck2/app/buck2_cli_proto:buck2_cli_proto",
        "//buck2/app/buck2_common:buck2_common",
        "//buck2/app/buck2_core:buck2_core",
        "//buck2/app/buck2_data:buck2_data",
        "//buck2/app/buck2_error:buck2_error",
        "//buck2/app/buck2_event_log:buck2_event_log",
        "//buck2/app/buck2_event_observer:buck2_event_observer",
        "//buck2/app/buck2_events:buck2_events",
        "//buck2/app/buck2_fs:buck2_fs",
        "//buck2/app/buck2_health_check:buck2_health_check",
        "//buck2/app/buck2_resource_control:buck2_resource_control",
        "//buck2/app/buck2_util:buck2_util",
        "//buck2/app/buck2_wrapper_common:buck2_wrapper_common",
        "//buck2/gazebo/dupe:dupe",
        "//buck2/gazebo/gazebo:gazebo",
        "//buck2/superconsole:superconsole",
        # @oss-disable[end= ]: "//common/rust/shed/detect_eden:detect_eden",
        "//common/rust/shed/fbinit:fbinit",
    ],
)
